package cn.gson.boot.model.dao;

import cn.gson.boot.model.pojos.Fahuo;
import cn.gson.boot.model.pojos.Wenda;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import javax.transaction.Transactional;

public interface WenDaDao extends CrudRepository<Wenda,Integer> {
    // （逻辑删除）
    @Transactional
    @Modifying(clearAutomatically = true)
    @Query(nativeQuery = true,value = "update wenda set wd_ys=0 where wd_id=?1")
    public void yichuWenDa(Integer wdId);
}
